/**
 * Calendar 组件的主题配置
 * 
 * 基于企业级设计规范 (Calendar.json) 的完整配置
 * 日历组件样式定义
 */

import type { ComponentToken } from 'antd/es/calendar/style';

// ========== 设计 Token 常量 ==========

/**
 * 颜色相关 Token
 */
const COLOR_TOKENS = {
  fullBg: '#ffffff',
  fullPanelBg: '#ffffff',
  itemActiveBg: '#e6f4ff',
} as const;

/**
 * 尺寸相关 Token
 */
const SIZE_TOKENS = {
  yearControlWidth: 80,
  monthControlWidth: 70,
  miniContentHeight: 256,
} as const;

/**
 * Calendar 完整主题配置
 */
export const calendarThemeConfig: Partial<ComponentToken> = {
  // ========== 颜色配置 ==========
  fullBg: COLOR_TOKENS.fullBg,
  fullPanelBg: COLOR_TOKENS.fullPanelBg,
  itemActiveBg: COLOR_TOKENS.itemActiveBg,

  // ========== 尺寸配置 ==========
  yearControlWidth: SIZE_TOKENS.yearControlWidth,
  monthControlWidth: SIZE_TOKENS.monthControlWidth,
  miniContentHeight: SIZE_TOKENS.miniContentHeight,
};

export const getCalendarTheme = (
  customConfig?: Partial<ComponentToken>
): Partial<ComponentToken> => {
  return {
    ...calendarThemeConfig,
    ...customConfig,
  };
};

export type { ComponentToken as CalendarComponentToken } from 'antd/es/calendar/style';

